package com.bdult.vh.dao;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;

import org.mybatis.spring.SqlSessionTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import com.bdult.vh.vo.BoardVO;

@Repository
public class BoardDAO implements CommonDAO {
	@Autowired
	private SqlSessionTemplate sqlSessionTemplate;

	public ArrayList<HashMap<String, Object>> noticeList(
			Map<String, Object> paramMap) {
		return (ArrayList<HashMap<String, Object>>) sqlSessionTemplate
				.selectList("noticeList", paramMap);
	}

	public ArrayList<HashMap<String, Object>> noticeList_event(
			Map<String, Object> paramMap) {
		return (ArrayList<HashMap<String, Object>>) sqlSessionTemplate
				.selectList("noticeList_event", paramMap);
	}

	public HashMap<String, Object> getboardTypeDetail(String boardTypeId) {
		return (HashMap<String, Object>) sqlSessionTemplate.selectOne(
				"getboardTypeDetail", boardTypeId);
	}

	public void insertBoard(BoardVO vo) {
		sqlSessionTemplate.insert("insertBoard", vo);
	}

}
